import Vue from 'vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App.vue'
import router from './router'
import store from './store'
import "./style/index.less"
import VueAwesomeSwiper from 'vue-awesome-swiper'
import API from "./common/api"
import Utils from "./common/utils"
import axios from "axios"


// require styles
import 'swiper/dist/css/swiper.css'
let area=[
    {
        name:"基隆市",
    },
    {
        name:"台北市",
    },
    {
        name:"新北市",
    },
    {
        name:"宜蘭市",
    },
    {
        name:"新竹市",
    },
    {
        name:"新竹縣",
    },
    {
        name:"桃園縣",
    },{
        name:"苗粟縣",
    },
    {
        name:"臺中市",
    },
    {
        name:"彰化縣",
    },
    {
        name:"南投縣",
    },
    {
        name:"嘉義市",
    },
    {
        name:"嘉義縣",
    },
    {
        name:"雲林縣",
    },
    {
        name:"臺南市",
    },
    {
        name:"高雄市",
    },
    {
        name:"屏東縣",
    },
    {
        name:"臺東縣",
    },
    {
        name:"花蓮縣",
    },
    {
        name:"金門縣",
    },
    {
        name:"連江縣",
    },
    {
        name:"澎湖縣",
    }
]
Vue.use(ElementUI);
Vue.use(VueAwesomeSwiper)
Vue.config.productionTip = false
Vue.prototype.API = API;
Vue.prototype.Utils = Utils;
axios.defaults.withCredentials=true;
Vue.prototype.$http=axios;
Vue.prototype.area=area;

if(process.env.NODE_ENV === 'production' ){
    Vue.prototype.imgUrl="/images/adbanner/";
    Vue.prototype.brandImg="/images/brand/";
    Vue.prototype.newsImg="/images/news/";
}else{
    Vue.prototype.imgUrl="http://47.75.78.38/images/adbanner/";
    Vue.prototype.brandImg="http://47.75.78.38/images/brand/";
    Vue.prototype.newsImg="http://47.75.78.38/images/news/";
}




Vue.prototype.$bus = new Vue();
Vue.prototype.formTips = "我們已為您送出！";
new Vue({
    router,
    store,
    render: function (h) { return h(App) }
}).$mount('#app')
